class_name ObjectPoolItem
extends Resource

@export var id:String
@export var display_name:String
@export var desc:String
@export var capacity:int = 10
@export var scene:PackedScene

func fill_pool() -> Array[Node]:
	var inses = []
	for i in range(capacity):
		var ins = scene.instantiate()
		inses.append(ins)
		if "visible" in ins:
			ins.visible = false
		var obj:ObjectPoolObj = Utils.find_child_by_type(ins,ObjectPoolObj,1)
		if obj:
			obj.init()
		GameObjectPoolSystem.add_child(obj)
	return inses
